import {
  createRouter,
  createWebHistory
} from 'vue-router'
const router = createRouter({
  history: createWebHistory(
    import.meta.env.BASE_URL),

  routes: [{
      path: '/login',
      component: () => import('@/views/Login/index.vue')
    },
    {
      path: '/',
      redirect: '/home',
      component: () => import('@/views/Layout/index.vue'),
      children: [{
          path: '/home',
          component: () => import('@/views/Home/index.vue')
        },
        {
          path: '/personage/photo',
          component: () => import('@/views/Personage/PhotoAlbum.vue')
        },
        {
          path: '/personage/about',
          component: () => import('@/views/Personage/AboutMe.vue')
        },
        {
          path: '/personage/learning',
          component: () => import('@/views/Personage/LearningPath.vue')
        },
        {
          path: '/personage/photo/:id',
          hidden: true,
          component: () => import('@/views/Personage/Photo.vue')
        },
        {
          path: '/personage/photo/video',
          hidden: true,
          component: () => import('@/views/Personage/components/UploadPage.vue')
        },
        {
          path: '/message',
          component: () => import('@/views/MessageBoard/index.vue'),
        },

        {
          path: '/talk',
          component: () => import('@/views/Talk/index.vue')
        },

        {
          path: '/talk/user',
          component: () => import('@/views/Talk/TalkUser.vue'),
        },
        {
          path: '/link',
          name: 'link',
          component: () => import('@/views/FriendlyLink/index.vue')
        },
        {
          path: '/article/category',
          component: () => import('@/views/Article/ArticleCategory.vue')
        },
        {
          path: '/article/pigeonhole',
          component: () => import('@/views/Article/ArticlePigeonhole.vue')
        },
        {
          path: '/article/label',
          component: () => import('@/views/Article/ArticleLabel.vue')
        },
        {
          path: '/article/pigeonhole/md/:id',
          hidden: true,
          component: () => import('@/views/Article/components/MdEditorDialog.vue')
        },
        {
          path: '/website',
          component: () => import('@/views/Website/index.vue')
        },
      ]
    }
  ]
})

export default router